# coding:utf-8

from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from google.appengine.ext.webapp.util import run_wsgi_app

import os
import config

class PageIndex(webapp.RequestHandler):
    def get(self):
        tplVals = {
            'title': config.web_title,
            }
        tplPath = os.path.join(os.path.dirname(__file__), 'tpl', 'web', 'index.html')

        self.response.headers['Content-Type'] = 'text/html; charset=utf-8'

        self.response.out.write(template.render(tplPath, tplVals))


def main():
    application = webapp.WSGIApplication([
        ('/', PageIndex)
    ], 
    debug=True)
    run_wsgi_app(application)

if __name__ == "__main__":
    main() 
